package com.guoxin.chapter2.synchronizedblocklockall.test1;

public class Run {

	public static void main(String[] args) {
		Service service = new Service();
		//使用不同的对象监视器
		MyObject myObject = new MyObject();
		MyObject myObject2 = new MyObject();
		ThreadA a = new ThreadA(service, myObject);
		a.setName("A");
		a.start();
		
		ThreadB b = new ThreadB(service, myObject2);
		b.setName("B");
		b.start();
	}

}
